home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / tbav503.zip / INSTALL.BAT < prev    next >
DOS Batch File  |  1992-12-29  |  7KB  |  235 lines

  1. @echo off
  2. echo off
  3. cls
  4. echo        --- Thunderbyte Anti-Virus installation batch program ---
  5. echo.
  6.  
  7. rem     * Make sure that we can find the utilities in the current directory
  8. if not exist TBAV.EXE goto error1
  9.  
  10. rem     * Make sure that the user specified a destination path
  11. if %1X==X goto error2
  12.  
  13. rem     * Make sure the target path exists or can be created
  14. if exist %1\nul goto pathexists
  15. md %1
  16. if not exist %1\nul goto error3
  17. :pathexists
  18.  
  19. rem     * Make sure user did not type something like 'C:' :-)
  20. if exist %1\CONFIG.SYS goto error5
  21.  
  22. rem     * Copy the TBAV utilities if necessary
  23. if exist dummy.tst del dummy.tst >nul
  24. if exist %1\dummy.tst del %1\dummy.tst >nul
  25. echo TEST >%1\dummy.tst
  26. if exist dummy.tst goto filesexist
  27. if not exist %1\dummy.tst goto error4
  28. echo Copying files. Please wait...
  29. copy *.* %1 >nul
  30. echo.
  31. :filesexist
  32. del %1\dummy.tst >nul
  33. if not exist %1\docs.exe goto nopack
  34. %1\docs -o %1
  35. del %1\docs.exe >nul
  36. :nopack
  37.  
  38. rem     * DOS has no interactive batch file commands,
  39. rem     * so we create a special program to solve that!
  40. rem     * the 'garbage' in the echo command is program code
  41. rem     * to read a key into an errorlevel, we copy the program code
  42. rem     * into something executable.
  43. echo ═êα╧┤L═! >%1\ask.com
  44.  
  45. echo.
  46. echo TbSetup will now generate or update the Anti-Vir.Dat file
  47. echo of the directory %1
  48. pause
  49. rem     * create or update the Anti-Vir.Dat records of the TBAV utilities
  50. %1\TBSETUP %1
  51.  
  52. cls
  53. rem     * do not overwrite an existing TBAV setup.
  54. if exist %1\TBSTART.BAT goto ready
  55.  
  56. echo.
  57. echo The Thunderbyte Anti-Virus utilities have been copied to the destination
  58. echo directory. It is recommended to read the documentation of TBAV thoroughly
  59. echo and to make a customized setup. One of the advantages of the Thunderbyte
  60. echo Anti-Virus utilities is flexibility and the possibility to configure
  61. echo them to suit your needs in an optimal way.
  62. echo.
  63. echo This installation batch file helps you to setup the utilities in their
  64. echo most standard and non-customized way.
  65. echo Do you want to continue? (Y/n)
  66. %1\ask
  67. if not errorlevel 1 goto ready
  68.  
  69. rem     * make a backup of the AUTOEXEC.BAT file!
  70. echo.
  71. echo Backing up C:\AUTOEXEC.BAT to C:\AUTOEXEC.ORG...
  72. copy c:\autoexec.bat c:\autoexec.org >nul
  73.  
  74. rem     * create a TBSTART.BAT file in the TBAV directory.
  75. echo @echo off >%1\TBSTART.BAT
  76. echo echo off >>%1\TBSTART.BAT
  77.  
  78. echo.
  79. echo For easy access of the TBAV utilities it is recommended to put them
  80. echo into your PATH environment variable.
  81. echo Do you want to add %1 to your PATH statement? (Y/n)
  82. %1\ask
  83. if not errorlevel 1 goto dosetup
  84. rem     * add the PATH statement to the end of the AUTOEXEC.BAT file.
  85. echo PATH=%%PATH%%;%1 >>C:\AUTOEXEC.BAT
  86.  
  87. :dosetup
  88. echo.
  89. echo TbSetup will now process the C:\ drive to generate the Anti-Vir.Dat files.
  90. echo You may need to repeat this process for other drives.
  91. pause
  92. rem     * process the rest of the machine, but do not touch existing information!
  93. %1\TBSETUP newonly C:\
  94.  
  95. :tbdriver
  96. cls
  97. echo.
  98. echo The TBAV package contains some utilities that can be installed in the memory
  99. echo of your PC. Do you want to add them to your AUTOEXEC.BAT file? (Y/n)
  100. %1\ask
  101. if not errorlevel 1 goto autoscan
  102. rem     * create a TBSTART.BAT file in the TBAV directory.
  103. echo %1\tbdriver >>%1\TBSTART.BAT
  104.  
  105. if not exist %1\VIRSCAN.DAT goto tbcheck
  106. echo.
  107. echo TBSCANX is a memory resident virus scanner.
  108. echo Do you want to install it? (Y/n)
  109. %1\ask
  110. if not errorlevel 1 goto tbcheck
  111. rem     * add the TbScanX statement to the TBSTART.BAT file.
  112. echo %1\tbscanx >>%1\TBSTART.BAT
  113.  
  114. :tbcheck
  115. echo.
  116. echo TBCHECK is a memory resident integrity checker.
  117. echo Do you want to install it? (Y/n)
  118. %1\ask
  119. if not errorlevel 1 goto tbmem
  120. rem     * add the TbCheck statement to the TBSTART.BAT file.
  121. echo %1\tbcheck >>%1\TBSTART.BAT
  122.  
  123. :tbmem
  124. echo.
  125. echo TBMEM is a resident memory guard.
  126. echo Do you want to install it? (Y/n)
  127. %1\ask
  128. if not errorlevel 1 goto tbfile
  129. rem     * add the TbMem statement to the TBSTART.BAT file.
  130. echo %1\tbmem >>%1\TBSTART.BAT
  131.  
  132. :tbfile
  133. echo.
  134. echo TBFILE is a resident file guard.
  135. echo Do you want to install it? (Y/n)
  136. %1\ask
  137. if not errorlevel 1 goto autoscan
  138. rem     * add the TbFile statement to the TBSTART.BAT file.
  139. echo %1\tbfile >>%1\TBSTART.BAT
  140.  
  141. :autoscan
  142. if not exist %1\VIRSCAN.DAT goto addcall
  143. echo.
  144. echo Do you want the system to be scanned automatically for viruses every day? (Y/n)
  145. %1\ask
  146. if not errorlevel 1 goto addcall
  147. rem     * add the TbScan statement to the TBSTART.BAT file.
  148. echo %1\tbscan once C:\ >>%1\TBSTART.BAT
  149.  
  150. :addcall
  151. if exist C:\TEMP.BAT del C:\TEMP.BAT >nul
  152. echo call %1\TBSTART.BAT >C:\TEMP.BAT
  153. copy /a C:\TEMP.BAT + C:\AUTOEXEC.BAT C:\TEMP2.BAT >nul
  154. copy C:\TEMP2.BAT C:\AUTOEXEC.BAT >nul
  155. del C:\TEMP.BAT >nul
  156. del C:\TEMP2.BAT >nul
  157.  
  158. :ready
  159. if not exist %1\VIRSCAN.DAT goto novirscan
  160. echo.
  161. echo Do you want to scan the C:\ disk now? (Y/n)
  162. %1\ask
  163. if not errorlevel 1 goto starttbav
  164. %1\tbscan C:\
  165. goto starttbav
  166.  
  167. :novirscan
  168. echo.
  169. echo VIRSCAN.DAT has not been found on your system. This file is required if
  170. echo you want to use TbScan or TbScanX. You can obtain a recent VIRSCAN.DAT
  171. echo on most Thunderbyte support Bulletin Board Systems.
  172.  
  173. :starttbav
  174. cls
  175. echo.
  176. echo TbSetup has been used to setup disk C:\. If your system has additional
  177. echo disk partitions, you have to use TBSETUP on your other disks as well.
  178. echo Consult the documentation for more information!
  179. echo.
  180. echo The menu program TBAV.EXE can be used to read the documentation files.
  181. echo Do you want to start TBAV now? (Y/n)
  182. %1\ask
  183. if not errorlevel 1 goto end
  184. %1\TBAV
  185. goto end
  186.  
  187. :error1
  188. echo Error: Invalid program invocation!
  189. echo.
  190. echo Make sure that you invoke INSTALL.BAT in the directory where the
  191. echo TBAV utilities can be found!
  192. echo.
  193. echo Example: if the TBAV utilities can be found on drive A:, you should type:
  194. echo A: <enter>
  195. echo INSTALL <path> <enter>
  196. goto end
  197.  
  198. :error2
  199. echo Error: No destination path specified!
  200. echo.
  201. echo You have to specify the destination path for the TBAV utilities!
  202. echo Even if the utilities are already in the destination path.
  203. echo.
  204. echo Example:
  205. echo If the TBAV utilities are or should be copied to C:\TBAV, please type:
  206. echo INSTALL C:\TBAV
  207. goto end
  208.  
  209. :error3
  210. echo Error: Unable to creat destination directory %1
  211. echo.
  212. echo Make sure you enter an existing destination path or a path that can be created!
  213. goto end
  214.  
  215. :error4
  216. echo Error: Unable to copy files in directory %1
  217. echo.
  218. echo Disk full? Access denied?
  219. goto end
  220.  
  221. :error5
  222. echo Error: No target directory specified!
  223. echo.
  224. echo Make sure you enter a full destination path!
  225. echo %1 is not sufficient!
  226. echo.
  227. echo Example:
  228. echo If the TBAV utilities are or should be copied to C:\TBAV, please type:
  229. echo INSTALL C:\TBAV
  230. goto end
  231.  
  232. :end
  233. if exist %1\ask.com del %1\ask.com >nul
  234.  
  235.